

import 'package:basic_common/app_theme.dart';
import 'package:basic_common/common_exports.dart';
import 'package:basic_services/model/server_fat_detail_data.dart';
import 'package:basic_services/serviceDetail/service_detail_controller.dart';
import 'package:basic_widgets/text_widget.dart';

class BloodFatInfoView extends GetView<ServerDetailController> {
  BloodFatInfoView({super.key, required this.detailData});
  ServerFatDetailData? detailData;
  SriList? srLiiData;

  @override
  Widget build(BuildContext context) {
    if (detailData!.sriList != null) {
      List<SriList> list = detailData!.sriList!;
      if (list.isNotEmpty) {
        srLiiData = list[0];
      }
    }
    return Container(
      width: ScreenHelper.screenWidth,
      // height: ScreenHelper.height(200),
      alignment: Alignment.center,
      padding: EdgeInsets.symmetric(horizontal: ScreenHelper.width(15)),
      margin: EdgeInsets.symmetric(horizontal: ScreenHelper.width(15)),
      color: Colors.white,
      child: ListView(
        physics: NeverScrollableScrollPhysics(),
        shrinkWrap: true,
        children: [
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: 'TC',
                value: '${srLiiData!.tc} mmol/L',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: 'TG',
                value: '${srLiiData!.tg!} mmol/L',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: 'CE',
                value: '${srLiiData!.ce!} mmol/L',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: 'HDL_C',
                value: '${srLiiData!.hdlC!} mmol/L',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: 'LDL_C',
                value: '${srLiiData!.ldlC!} mmol/L',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          ),
          Container(
            margin: EdgeInsets.symmetric(vertical: 6),
            child: textItemWidget(
                attrName: '评估',
                value: '${srLiiData!.evaluate!} ',
                fontSize: 16,
                valuColor: AppTheme.dartTextColor),
          )
        ],
      ),
    );
  }
}
